package com.rs.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.rs.dao.ZhWorklogMapper;
import com.rs.model.ZhWorklog;
import com.rs.service.ZhWorklogService;

@Service
@Transactional
public class ZhWorklogServiceImpl implements ZhWorklogService {

	@Autowired
	private ZhWorklogMapper ZhWorklog;
	
	@Override
	public int insertSelective(ZhWorklog record) {
		return ZhWorklog.insertSelective(record);
	}

	@Override
	public int deleteByPrimaryKey(ZhWorklog key) {
			return ZhWorklog.deleteByPrimaryKey(key);
	}

	@Override
	public int updateByPrimaryKeySelective(com.rs.model.ZhWorklog record) {
		return ZhWorklog.updateByPrimaryKeySelective(record);
	}

	@Override
	public com.rs.model.ZhWorklog selectByPrimaryKey(ZhWorklog key) {
		return ZhWorklog.selectByPrimaryKey(key);
	}

	@Override
	public Page<com.rs.model.ZhWorklog> selectByZhWorklogList(Integer pageNum, Integer pageSize,ZhWorklog record) {
		//用插件进行分页
        PageHelper.startPage(pageNum, 10);// 参数： 页数   条数
		return ZhWorklog.selectByZhWorklogList(record);//调用mapper无需多说
	}

}
